package com.weichen.studentgameexchange.strategy.feign;

import com.weichen.studentgameexchange.game.entity.Game;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(name = "game-service", url = "http://localhost:7000")
public interface GameFeignClient {

    @GetMapping("/game/{gameId}")
    Game getGameById(@PathVariable("gameId") Long gameId);

    @PostMapping("/game/batch/")
    List<Game> getGamesByIds(@RequestBody List<Long> gameIds);

    @GetMapping("/game/getId")
    Game getGameId(@RequestParam("gameName") String gameName);

    @GetMapping("/game/getIds")
    List<Game> getLikeGame(@RequestParam("gameName") String gameName);
}
